package com.example.hhhh;

import android.os.Bundle;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.alibaba.android.arouter.facade.annotation.Route;

import java.util.ArrayList;

/**
 * @ProjectName: Hhhh
 * @Package: com.example.hhhh
 * @ClassName: FristAct
 * @Description: java类作用描述
 * @Author: songhua
 * @CreateDate: 2019/12/20 0020 16:02
 */
@Route(path = "/app/SeventhAct")
public class SeventhAct extends SwipeBackActivity implements View.OnClickListener {
    private static final String TAG = "SixAct";
    Toolbar toolbar;
    CollapsingToolbarLayout collapsingToolbarLayout;
    private Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_seventh);

        init();

    }

    private void init() {
        //toolbar
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        button = (Button) findViewById(R.id.btn);
        toolbar.setNavigationIcon(R.drawable.shadow_right);
        button.setOnClickListener(this);
        //Palette用来更漂亮地展示配色

        //CollapsingToolbarLayout
        collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingToolbar);
        collapsingToolbarLayout.setTitle("我是一个标题啊哈哈哈");
    }


    @Override
    public void onClick(View v) {
        ArrayList<AccessInfo> accessInfos = new ArrayList<AccessInfo>();
        accessInfos.add(new AccessInfo(1, "6830B-0191-XA-测试1"));
        accessInfos.add(new AccessInfo(2, "演示门禁9A5|1"));
        accessInfos.add(new AccessInfo(3, "悦家智慧门禁ZA3.2"));
        accessInfos.add(new AccessInfo(4, "A栋1123"));
        accessInfos.add(new AccessInfo(5, "1123"));
//        accessInfos.add(new AccessInfo(6, "00051"));
        accessInfos.add(new AccessInfo(6, "00051","777东方闪电"));
        accessInfos.add(new AccessInfo(7, "1栋A单元前门"));
        accessInfos.add(new AccessInfo(8, "1栋A单元门禁"));
        accessInfos.add(new AccessInfo(9, " test2"));
        accessInfos.add(new AccessInfo(10, " test3"));
//        accessInfos.add(new AccessInfo(11, " test4"));
        accessInfos.add(new AccessInfo(11, " test4","00爽肤水"));
        accessInfos.add(new AccessInfo(12, " test5"));
        accessInfos.add(new AccessInfo(13, " test6"));
        accessInfos.add(new AccessInfo(14, " test7"));
        accessInfos.add(new AccessInfo(15, " test8"));
        accessInfos.add(new AccessInfo(16, " test9"));
        accessInfos.add(new AccessInfo(17, " test10"));
        accessInfos.add(new AccessInfo(18, " test1"));
        accessInfos.add(new AccessInfo(5, " 蓝牙门测试"));
        accessInfos.add(new AccessInfo(6, "测试门禁系统"));
        accessInfos.add(new AccessInfo(7, "测试二维码门请勿动"));
        accessInfos.add(new AccessInfo(8, "大豪16A431AA"));
        SortUtils.setSortOrder(0, 2, 1, 3);
        StringBuffer stringBuffer =new StringBuffer();
        ArrayList<AccessInfo> data = SortUtils.sortStringArray(accessInfos);
        for (int i = 0; i <data.size() ; i++) {
            stringBuffer.append(data.get(i).toString()+"\n");
        }
        Log.e(TAG, "data:"+stringBuffer);

    }
}
